@extends('admin.layout.index')
@section('title','管理员模块')
@section('title1','管理员模块')
@section('title2','添加管理员')
@section('content')
	<!-- 显示闪存中的错误信息 -->
	<!-- @if(session('error'))
	<div class="alert alert-danger alert-dismissable">
	    <button aria-hidden="true" data-dismiss="alert" class="close" type="button">×</button>
	    {{session('error')}}<a class="alert-link" href="#"></a>.
	</div>
	@endif -->
	@if(count($errors)>0)
		<div class="alert alert-danger"> 
			<ul>
				@foreach($errors->all() as $error)
					<li>{{$error}}</li>
				@endforeach
			</ul>
		</div>
	@endif
	<div class="row">
	    <div class="col-lg-8">
		    <div class="panel panel-default">
		        <div class="panel-heading">
		           &nbsp;
		        </div>
		        <div class="panel-body">
		            <div class="row">
		                <div class="col-lg-6">
		                    <form role="form" action="{{url('admin/manager/insert')}}" method="post">
		                        <div class="form-group">
		                            <label>管理员账号</label>
		                            <input type="text" name="adminName" class="form-control" placeholder="请输入管理员账号" value="{{old('adminName')}}">
		                            <p class="help-block"></p>
		                        </div> 
		                         <div class="form-group">
		                            <label>管理员密码</label>
		                            <input type="password" name="password" placeholder="请输入管理员密码" class="form-control" value="{{old('password')}}">
		                        </div>
		                       	<div class="form-group">
                                            <label>用户权限</label>

                                            <select name="permissions" class="form-control">
                                                <option value="1" @if(old('permissions')==1) selected @endif>超级管理员</option>
                                                <option value="2" @if(old('permissions')==2) selected @endif>管理员</option>
                                            </select>
                                    </div>
		                        {{csrf_field()}}
		                        <button class="btn btn-success" type="submit">添加</button>
		                        <button class="btn btn-danger" type="reset">修改</button>
		                    </form>
		                </div>
		            </div>
		            <!-- /.row (nested) -->
		        </div>
		        <!-- /.panel-body -->
		    </div>
		    <!-- /.panel -->
	    </div>
	 </div>
@endsection